presents


a plugin for Cinema 4D XL
Idea by thorn - Implementation and algorithm by Ben Johnson

Roll It is a plugin which assists in determining how an object should rotate as it moves along a path. If you've ever tried to animate a ball rolling along a floor, you've probably struggled trying to get the rotation just right. Well, no more! With Roll It, this process is now pain-free.


Although Roll It will work with any object, it is really meant to be used with spherical ones. We'll use a sphere in the example below, and go through it step by step. You might also wish to look at the included scene file to see the end result.

Start by keyframing the object's position path in the traditional manner. Do not record keyframes for direction; Roll It will be providing these values. Record a position at frame 0, another at frame 30, etc. You can use multiple keyframe if you like, but be sure you have at least 2 - we need both a start and an end point. Now, convert the object's position track to a spline. You'll see a new spline object appear in the Object Manager. Rename this spline "rollpath".

Now, choose Roll It from your plugin menu. You'll see the following dialog appear:

Object to Roll: Input the object which will be rolling; in other words, the object you just position keyframed.
Roll Path: Input the spline created from the position track (as described above).

After you click "ok", the required rotation will appear in an alert box. (In case you need to refer to it at a later time, it is also displayed in the C.O.F.F.E.E. console.)

Now, bring up the sequencer and create a direction track for the sphere. The duration should equal to the duration of the position track. Create a keyframe at frame 0, and input 0,0,0 for the XYZ direction values. For the last keyframe, input 0/0 for the XZ values, and for the Y value input the number provided by Roll It - in this case, 990 degrees (Roll It gives a complete decimal value, but you can round the number to the nearest integer). Now run the animation, and you'll see your object correctly rotate as it moves along the path.

Hints:

  • Roll It doesn't know which direction your object is moving over time - therefore your sphere many roll backwards! This is easy to rectify - simply change the Y-direction value from a positive to a negative value.
  • If you want the object to roll tangent to the path - as it usually happens in the real world - create a null parent for the sphere. Transfer the position track from the sphere to the null, and also assign an Align to Path track to the null. Leave the direction track on the sphere.

We hope you will find Roll It to be a useful plugin. If you have any suggestions (or problems) with this plugin, please don't hesitate to contact us!


About Cup of C.O.F.F.E.E.

Cup of C.O.F.F.E.E. plugins are created by Ben Johnson. The emphasis is on quality, reliability, and usefulness. Ben works very hard to bring Cinema 4D users great plugins at a very affordable price. Please do not distribute these plugins. They are copyrighted material, and piracy only discourages future development. Support the developer, and he will support you. And thanks for purchasing this Cup of C.O.F.F.E.E. plugin!


 

Cup of C.O.F.F.E.E. Plugins are distributed by

 

 

 

Roll It ©1998, Ben Johnson